package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the MEDCINESTORE database table.
 * 
 */
@Entity
@NamedQuery(name="Medcinestore.findAll", query="SELECT m FROM Medcinestore m")
public class Medcinestore implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="MEDCINESTORE_ID")
	private long medcinestoreId;

	public Medcinestore(long medcinestoreId, String medcinestoreName) {
		super();
		this.medcinestoreId = medcinestoreId;
		this.medcinestoreName = medcinestoreName;
	}

	@Column(name="MEDCINESTORE_NAME")
	private String medcinestoreName;

	//bi-directional many-to-one association to DrugstoreDemage
	@OneToMany(mappedBy="medcinestore")
	private List<DrugstoreDemage> drugstoreDemages;

	//bi-directional many-to-one association to MedcinestoreType
	@ManyToOne
	@JoinColumn(name="MEDCINESTORE_TYPE_ID")
	private MedcinestoreType medcinestoreType;

	//bi-directional many-to-one association to Staff
	@ManyToOne
	@JoinColumn(name="STAFF_ID")
	private Staff staff;

	//bi-directional many-to-one association to MedcinestoreAcceptdrug
	@OneToMany(mappedBy="medcinestore")
	private List<MedcinestoreAcceptdrug> medcinestoreAcceptdrugs;

	//bi-directional many-to-one association to MedcinestoreHasdrug
	@OneToMany(mappedBy="medcinestore")
	private List<MedcinestoreHasdrug> medcinestoreHasdrugs;

	//bi-directional many-to-one association to MedcinestoreLackDrug
	@OneToMany(mappedBy="medcinestore")
	private List<MedcinestoreLackDrug> medcinestoreLackDrugs;

	//bi-directional many-to-one association to MedcinestoreRemind
	@OneToMany(mappedBy="medcinestore")
	private List<MedcinestoreRemind> medcinestoreReminds;

	//bi-directional many-to-one association to MedcinestoreSendmedcine
	@OneToMany(mappedBy="medcinestore")
	private List<MedcinestoreSendmedcine> medcinestoreSendmedcines;

	//bi-directional many-to-one association to MedcinestoreWindow
	@OneToMany(mappedBy="medcinestore")
	private List<MedcinestoreWindow> medcinestoreWindows;

	//bi-directional many-to-one association to SendmedcineDrugstoreDetail
	@OneToMany(mappedBy="medcinestore")
	private List<SendmedcineDrugstoreDetail> sendmedcineDrugstoreDetails;

	public Medcinestore() {
	}

	public long getMedcinestoreId() {
		return this.medcinestoreId;
	}

	public void setMedcinestoreId(long medcinestoreId) {
		this.medcinestoreId = medcinestoreId;
	}

	public String getMedcinestoreName() {
		return this.medcinestoreName;
	}

	public void setMedcinestoreName(String medcinestoreName) {
		this.medcinestoreName = medcinestoreName;
	}

	public List<DrugstoreDemage> getDrugstoreDemages() {
		return this.drugstoreDemages;
	}

	public void setDrugstoreDemages(List<DrugstoreDemage> drugstoreDemages) {
		this.drugstoreDemages = drugstoreDemages;
	}

	public DrugstoreDemage addDrugstoreDemage(DrugstoreDemage drugstoreDemage) {
		getDrugstoreDemages().add(drugstoreDemage);
		drugstoreDemage.setMedcinestore(this);

		return drugstoreDemage;
	}

	public DrugstoreDemage removeDrugstoreDemage(DrugstoreDemage drugstoreDemage) {
		getDrugstoreDemages().remove(drugstoreDemage);
		drugstoreDemage.setMedcinestore(null);

		return drugstoreDemage;
	}

	public MedcinestoreType getMedcinestoreType() {
		return this.medcinestoreType;
	}

	public void setMedcinestoreType(MedcinestoreType medcinestoreType) {
		this.medcinestoreType = medcinestoreType;
	}

	public Staff getStaff() {
		return this.staff;
	}

	public void setStaff(Staff staff) {
		this.staff = staff;
	}

	public List<MedcinestoreAcceptdrug> getMedcinestoreAcceptdrugs() {
		return this.medcinestoreAcceptdrugs;
	}

	public void setMedcinestoreAcceptdrugs(List<MedcinestoreAcceptdrug> medcinestoreAcceptdrugs) {
		this.medcinestoreAcceptdrugs = medcinestoreAcceptdrugs;
	}

	public MedcinestoreAcceptdrug addMedcinestoreAcceptdrug(MedcinestoreAcceptdrug medcinestoreAcceptdrug) {
		getMedcinestoreAcceptdrugs().add(medcinestoreAcceptdrug);
		medcinestoreAcceptdrug.setMedcinestore(this);

		return medcinestoreAcceptdrug;
	}

	public MedcinestoreAcceptdrug removeMedcinestoreAcceptdrug(MedcinestoreAcceptdrug medcinestoreAcceptdrug) {
		getMedcinestoreAcceptdrugs().remove(medcinestoreAcceptdrug);
		medcinestoreAcceptdrug.setMedcinestore(null);

		return medcinestoreAcceptdrug;
	}

	public List<MedcinestoreHasdrug> getMedcinestoreHasdrugs() {
		return this.medcinestoreHasdrugs;
	}

	public void setMedcinestoreHasdrugs(List<MedcinestoreHasdrug> medcinestoreHasdrugs) {
		this.medcinestoreHasdrugs = medcinestoreHasdrugs;
	}

	public MedcinestoreHasdrug addMedcinestoreHasdrug(MedcinestoreHasdrug medcinestoreHasdrug) {
		getMedcinestoreHasdrugs().add(medcinestoreHasdrug);
		medcinestoreHasdrug.setMedcinestore(this);

		return medcinestoreHasdrug;
	}

	public MedcinestoreHasdrug removeMedcinestoreHasdrug(MedcinestoreHasdrug medcinestoreHasdrug) {
		getMedcinestoreHasdrugs().remove(medcinestoreHasdrug);
		medcinestoreHasdrug.setMedcinestore(null);

		return medcinestoreHasdrug;
	}

	public List<MedcinestoreLackDrug> getMedcinestoreLackDrugs() {
		return this.medcinestoreLackDrugs;
	}

	public void setMedcinestoreLackDrugs(List<MedcinestoreLackDrug> medcinestoreLackDrugs) {
		this.medcinestoreLackDrugs = medcinestoreLackDrugs;
	}

	public MedcinestoreLackDrug addMedcinestoreLackDrug(MedcinestoreLackDrug medcinestoreLackDrug) {
		getMedcinestoreLackDrugs().add(medcinestoreLackDrug);
		medcinestoreLackDrug.setMedcinestore(this);

		return medcinestoreLackDrug;
	}

	public MedcinestoreLackDrug removeMedcinestoreLackDrug(MedcinestoreLackDrug medcinestoreLackDrug) {
		getMedcinestoreLackDrugs().remove(medcinestoreLackDrug);
		medcinestoreLackDrug.setMedcinestore(null);

		return medcinestoreLackDrug;
	}

	public List<MedcinestoreRemind> getMedcinestoreReminds() {
		return this.medcinestoreReminds;
	}

	public void setMedcinestoreReminds(List<MedcinestoreRemind> medcinestoreReminds) {
		this.medcinestoreReminds = medcinestoreReminds;
	}

	public MedcinestoreRemind addMedcinestoreRemind(MedcinestoreRemind medcinestoreRemind) {
		getMedcinestoreReminds().add(medcinestoreRemind);
		medcinestoreRemind.setMedcinestore(this);

		return medcinestoreRemind;
	}

	public MedcinestoreRemind removeMedcinestoreRemind(MedcinestoreRemind medcinestoreRemind) {
		getMedcinestoreReminds().remove(medcinestoreRemind);
		medcinestoreRemind.setMedcinestore(null);

		return medcinestoreRemind;
	}

	public List<MedcinestoreSendmedcine> getMedcinestoreSendmedcines() {
		return this.medcinestoreSendmedcines;
	}

	public void setMedcinestoreSendmedcines(List<MedcinestoreSendmedcine> medcinestoreSendmedcines) {
		this.medcinestoreSendmedcines = medcinestoreSendmedcines;
	}

	public MedcinestoreSendmedcine addMedcinestoreSendmedcine(MedcinestoreSendmedcine medcinestoreSendmedcine) {
		getMedcinestoreSendmedcines().add(medcinestoreSendmedcine);
		medcinestoreSendmedcine.setMedcinestore(this);

		return medcinestoreSendmedcine;
	}

	public MedcinestoreSendmedcine removeMedcinestoreSendmedcine(MedcinestoreSendmedcine medcinestoreSendmedcine) {
		getMedcinestoreSendmedcines().remove(medcinestoreSendmedcine);
		medcinestoreSendmedcine.setMedcinestore(null);

		return medcinestoreSendmedcine;
	}

	public List<MedcinestoreWindow> getMedcinestoreWindows() {
		return this.medcinestoreWindows;
	}

	public void setMedcinestoreWindows(List<MedcinestoreWindow> medcinestoreWindows) {
		this.medcinestoreWindows = medcinestoreWindows;
	}

	public MedcinestoreWindow addMedcinestoreWindow(MedcinestoreWindow medcinestoreWindow) {
		getMedcinestoreWindows().add(medcinestoreWindow);
		medcinestoreWindow.setMedcinestore(this);

		return medcinestoreWindow;
	}

	public MedcinestoreWindow removeMedcinestoreWindow(MedcinestoreWindow medcinestoreWindow) {
		getMedcinestoreWindows().remove(medcinestoreWindow);
		medcinestoreWindow.setMedcinestore(null);

		return medcinestoreWindow;
	}

	public List<SendmedcineDrugstoreDetail> getSendmedcineDrugstoreDetails() {
		return this.sendmedcineDrugstoreDetails;
	}

	public void setSendmedcineDrugstoreDetails(List<SendmedcineDrugstoreDetail> sendmedcineDrugstoreDetails) {
		this.sendmedcineDrugstoreDetails = sendmedcineDrugstoreDetails;
	}

	public SendmedcineDrugstoreDetail addSendmedcineDrugstoreDetail(SendmedcineDrugstoreDetail sendmedcineDrugstoreDetail) {
		getSendmedcineDrugstoreDetails().add(sendmedcineDrugstoreDetail);
		sendmedcineDrugstoreDetail.setMedcinestore(this);

		return sendmedcineDrugstoreDetail;
	}

	public SendmedcineDrugstoreDetail removeSendmedcineDrugstoreDetail(SendmedcineDrugstoreDetail sendmedcineDrugstoreDetail) {
		getSendmedcineDrugstoreDetails().remove(sendmedcineDrugstoreDetail);
		sendmedcineDrugstoreDetail.setMedcinestore(null);

		return sendmedcineDrugstoreDetail;
	}

}